home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Panorama
/
Panorama - Disk 22A (1987-10-14)(Pacific North-West Amigas Club)[WB].zip
/
Panorama - Disk 22A (1987-10-14)(Pacific North-West Amigas Club)[WB].adf
/
Request
/
request.doc
< prev
next >
Wrap
Text File
|
1987-10-05
|
2KB
|
32 lines
Simple requester demo by Charlie Gibbs - October 5, 1987
I was writing an assembly program that tried to put up a requester,
and was having so much trouble with it that I isolated the requester code
in a small test program. (This made it easier to show others when I yelled
for help.) Once I got the test program working, I realized that it might
be helpful for others who might be trying to unravel the Amiga's secrets,
just as Colin Fox's window demo provides a starting point for window
manipulation. So here it is.
This program uses the simplest form of requester display: the
AutoRequest routine. AutoRequest automatically and invisibly handles
setting up and displaying a Requester structure. If you give it a window
pointer of NULL, as this program does, it will also take care of opening
a window for your requester.
My program didn't need to have the user make a choice (e.g. continue
or cancel) - I just wanted to display a message saying something terrible
had happened, and quit after he acknowledged it. Therefore I have set
PositiveText to NULL, causing only the NegativeText to be displayed. It
would be easy enough to provide an IntuiText structure for PositiveText,
and examine D0 for a true or false result upon return from AutoRequest.
This example defines the IntuiText structures itself so that you
don't need Commodore's include files to assemble it. Note that the left
and top offsets of NegativeText do not refer to the top left corner of
the requester, but rather to the top left corner of the gadget in which
the text appears. I was getting a blank gadget until I realized this.
I hereby place this program in the public domain. Do whatever you
want with it. Hopefully some of you can learn from it, just as I did.